package org.jeecg.modules.demo.yxwarehouse.service.impl;

import org.jeecg.modules.demo.customer.entity.YxCustomer;
import org.jeecg.modules.demo.yxwarehouse.entity.YxWarehouse;
import org.jeecg.modules.demo.yxwarehouse.mapper.YxWarehouseMapper;
import org.jeecg.modules.demo.yxwarehouse.service.IYxWarehouseService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 运销仓库
 * @Author: jeecg-boot
 * @Date:   2023-06-07
 * @Version: V1.0
 */
@Service
public class YxWarehouseServiceImpl extends ServiceImpl<YxWarehouseMapper, YxWarehouse> implements IYxWarehouseService {
    @Resource
    private YxWarehouseMapper yxWarehouseMapper;

    @Override
    public  List<YxWarehouse> getWarehouseList(){
        return yxWarehouseMapper.getWarehouseList();
    }
    @Override
    public boolean revertLogicDeletedWarehouse(List<String> warehouseIds){
        String ids = String.format("'%s'", String.join("','", warehouseIds));
        return yxWarehouseMapper.revertLogicDeletedWarehouse(ids) > 0;
    }

}
